$(function(){

    var siteCanvas = $("#sites-canvas-main-content");
    var blocks = $("div.sites-codeblock", siteCanvas);
    var codeBlock, code;        console.log(blocks.length);        $(blocks).each(            if (blocks[i].hasChildNodes())
        {
            $(this).removeClass();            code = this.innerHTML;
            
            
            if (code.search(/css:/i) != -1)
            {
                $(this).addClass("brush: css");
            } 
            else if (code.search(/html:/i) != -1)
            {
                 $(this).addClass("brush: xml");
            } 
            else if (code.search(/js:/i) != -1)
            { 
                 $(this).addClass("brush: js");
            } 
            else if (code.search(/php:/i) != -1)
            {
                 $(this).addClass("brush: php");
            }
        }            );
        /*
    for (var i = 0, b = blocks.length; i < b; i++)
    {
        if (blocks[i].hasChildNodes())
        {
            
            codeBlock = blocks[i];
            code = codeBlock.innerHTML;
            
            
            if (code.search(/css:/i) != -1)
            {
                codeBlock.className = "brush: css";
            } 
            else if (code.search(/html:/i) != -1)
            {
                codeBlock.className = "brush: xml";
            } 
            else if (code.search(/js:/i) != -1)
            { 
                codeBlock.className = "brush: js";
            } 
            else if (code.search(/php:/i) != -1)
            {
                codeBlock.className = "brush: php";
            }
        }
    }
    */
    
    SyntaxHighlighter.config.tagName = "div";
    SyntaxHighlighter.all();

});